
//多开检查
export function checkIp() {
    let ipMap = {};
    let machineMap = {};

    for (let i = 0; i < GameLib.PlayCount; i++) {
        let play: TPlayObject = GameLib.GetPlayer(i);
        if (play.GetNotOnlineAddExp()) {
            continue;
        }
        let list = machineMap[play.MachineCode];
        if (!list) {
            list = [];
            machineMap[play.MachineCode] = list;
        }
        if (list.length >= 3) {
            play.MapMove('3', 333, 333);
            play.KickOffLine();
            continue;
        }
        list.push(play.Name);

        list = ipMap[play.IPAddress];
        if (!list) {
            list = [];
            machineMap[play.IPAddress] = list;
        }
        if (list.length >= 3) {
            play.MapMove('3', 333, 333);
            play.KickOffLine();
            continue;
        }
        list.push(play.Name);

    }
}